package com.logistic.common;
import org.apache.commons.configuration.Configuration;      
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;  

public class PropertiesConfigurationSample {
	//get Unit Price
	public static Float getUnitPrice(){
		Configuration cfg = null;
		try {
			cfg = new PropertiesConfiguration("paraConfig.properties");
		} catch (ConfigurationException e) {
			e.printStackTrace();
		}
		return cfg.getFloat("unit.price");      
	}
	
	//get Exchange Rate
	public static Float getExchangeRate(){
		Configuration cfg = null;
		try {
			cfg = new PropertiesConfiguration("paraConfig.properties");
		} catch (ConfigurationException e) {
			e.printStackTrace();
		}
		return cfg.getFloat("exchange.rate");
	}
}

